<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>商品评价</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!--标准mui.css-->
    <link rel="stylesheet" href="${base!}/assets/front/h5/css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="${base!}/assets/front/h5/css/icons-extra.css" />
    <link rel="stylesheet" href="${base!}/assets/front/h5/css/hryc.css" />
    <link rel="stylesheet" href="${base!}/assets/front/newH5/css/index.css?v=${@date.getDateTime()}" />
    <!--App自定义的css-->
    <!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
    <style>
        .mui-table-view .mui-media-object {
            line-height: 42px;
            max-width: 145px;
            height: 100px;
        }
        .jiage-text{
            font-size: 18px;
            color: red;
            margin-right:10px ;
        }
        [v-cloak]{
            display: none !important;
        }
    </style>
</head>
<body>


<header class="mui-bar mui-bar-nav top-color">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white;"></a>
    <h1 class="mui-title" style="color: white;">
        商品评价
    </h1>
</header>


<div id="vue" style="margin-top: 60px;margin-bottom: 60px;" v-cloak>
    <div class="mui-card"  v-for="good in feedList" :key="good.id">
        <div class="mui-card-content">
            <div class="mui-card-content">
                <ul class="mui-table-view">
                    <div style="margin: 15px;">
                        <div style="border-bottom: 1px solid #e5e5e5;padding-bottom: 10px">{{good.accountUser.accountInfo.nickname}}<span style="color: #999999;float: right">{{good.feedAtTime}}</span></div>
                        <p style="margin-top: 10px">{{good.feedNote}}</p>
                    </div>
                </ul>
            </div>
        </div>
    </div>
</div>



<script type="text/javascript" src="${base!}/assets/front/h5/js/mui.js" ></script>
<script type="text/javascript" src="${base!}/assets/front/h5/js/vue.js" ></script>
<script type="text/javascript" src="${base!}/assets/front/h5/js/jquery-2.0.0.min.js" ></script>
<script type="application/javascript">
    mui.init({
        swipeBack:true //启用右滑关闭功能
    });

    var vue = new Vue({
        el: '#vue',
        data: {
            feedList: [],
        },
        created:function () {   //实例初始化创建完成执行

            this.queryFeedback();     //调用自身方法

        },
        methods:{              //定义封装方法
            //获取列表
            queryFeedback:function () {
                var self = this;
                var status = "${status!}";
                $.ajax({
                    type:"POST",
                    url:"${base!}/open/h5/feedback/queryFeedback",
                    dataType:"JSON",
                    data:{
                        goodsId:'${goodsId!}'
                    },
                    success:function(data){
                        if (data.code == 0) {
                            var d = data.data;
                            // $.each(d, function (index, obj) {
                            //     obj.feedAtTime=formatDate(obj.feedAt)
                            //     d[index] = obj;
                            // })
                            self.feedList = d;
                        } else {

                        }
                    }
                });

            }
        },
        filters: {

        },
        watch:{     //监听器
            // carModel:function () {
            //     this.getProvince();
            // }
        }

    })

    function formatDate(value) {
        let date = new Date(value);
        let y = date.getFullYear();
        let MM = date.getMonth() + 1;
        MM = MM < 10 ? ('0' + MM) : MM;
        let d = date.getDate();
        d = d < 10 ? ('0' + d) : d;
        let h = date.getHours();
        h = h < 10 ? ('0' + h) : h;
        let m = date.getMinutes();
        m = m < 10 ? ('0' + m) : m;
        let s = date.getSeconds();
        s = s < 10 ? ('0' + s) : s;
        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
    }

</script>
</body>
</html>
